#include "javascriptconsole.h"

JavascriptConsole::JavascriptConsole(QWidget *parent)
    : QDockWidget(parent)
    , mainWidget(new QWidget(this))
{
    createActions();
    setWindowTitle(tr("Javascript Console"));
}

JavascriptConsole::~JavascriptConsole()
{

}

void JavascriptConsole::setupDock()
{
    setAllowedAreas(Qt::AllDockWidgetAreas);
    setWidget(mainWidget);
}

void JavascriptConsole::createActions()
{
    helpJavascriptAction = new QAction(tr("help"), parent());
    helpJavascriptAction->setStatusTip(tr("Ajuda"));

    aboutJavascriptAction = new QAction(tr("About"), parent());
    aboutJavascriptAction->setStatusTip(tr("About"));
}

QMenu* JavascriptConsole::menu(QMenu* inMenu)
{
    menuBar = inMenu->addMenu(tr("Console Javascript"));
    menuBar->addAction(toggleViewAction());
    menuBar->addAction(helpJavascriptAction);
    menuBar->addAction(aboutJavascriptAction);

    return menuBar;
}
